﻿function onAddResultData() {
            Efs.getDom("formAddResult").setAttribute("url", "../Controller.aspx?controller=GeneralController&method=AddResultData");
            Efs.getExt("formAddResult").reset();
        }

function onEditResultData() {
    Efs.getDom("formAddResult").setAttribute("url", "../Controller.aspx?controller=GeneralController&method=UpdateResultData");

    Efs.getExt("formAddResult").reset();
    //根据ID从后台加载数据
    Efs.Common.ajax("../Controller.aspx?controller=GeneralController&method=GetResultData", "", function(succ, response, options) {
        if (succ) { // 是否成功
            var xmlReturnDoc = response.responseXML;
            Efs.Common.setEditValue(xmlReturnDoc, Efs.getExt("formAddResult"), "QUERYINFO");
        }
        else {
            alert("加载数据失败!");
        }
    });
}

function onStartAddResult() {
    Efs.getExt("formAddResult").submit();
}

// 获取异步提交的返回监听函数
function frmPostSubBack(bln, from, action) {
    if (bln) {
        alert("操作成功");
    }
    else {
        var xml_http = action.response;
        if (xml_http != null) {
            var objXML = xml_http.responseXML;

            alert("处理失败：" + Efs.Common.getNodeValue(objXML, "//FUNCERROR", 0));
            objXML = null;
        }
        xml_http = null;
    }
}

